/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesOrderTaskLog extends BasicModel<MesOrderTaskLog> {
  taskId?: string; // 任务ID
  operator?: string; // 操作工
  ctype?: string; // 日志类型
  lineCode?: string; // 机台
}

export const mesOrderTaskLogList = (params?: MesOrderTaskLog | any) =>
  defHttp.get<MesOrderTaskLog>({ url: adminPath + '/mo/log/mesOrderTaskLog/list', params });

export const mesOrderTaskLogListData = (params?: MesOrderTaskLog | any) =>
  defHttp.post<Page<MesOrderTaskLog>>({ url: adminPath + '/mo/log/mesOrderTaskLog/listData', params });

export const mesOrderTaskLogForm = (params?: MesOrderTaskLog | any) =>
  defHttp.get<MesOrderTaskLog>({ url: adminPath + '/mo/log/mesOrderTaskLog/form', params });

export const mesOrderTaskLogSave = (params?: any, data?: MesOrderTaskLog | any) =>
  defHttp.postJson<MesOrderTaskLog>({ url: adminPath + '/mo/log/mesOrderTaskLog/save', params, data });

export const mesOrderTaskLogDelete = (params?: MesOrderTaskLog | any) =>
  defHttp.get<MesOrderTaskLog>({ url: adminPath + '/mo/log/mesOrderTaskLog/delete', params });
